package com.hao.imserver.controller;

import javax.servlet.http.HttpSession;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.hao.imserver.cache.ICacheService;
import com.hao.imserver.dto.Result;
import com.hao.imserver.dto.ResultFactory;

@RestController
@RequestMapping("api")
public class ApiController {

    private static final Logger log = LoggerFactory.getLogger(ApiController.class);
    
    @Autowired
    private ICacheService cacheService;
    
    @GetMapping("ok")
    public Object test() {
	log.info("{}", cacheService);
	return "ok";
    }

    @PostMapping(value = "/pushVideoListToWeb")
    public Result login(String key, HttpSession session) {
	
	return ResultFactory.ok();
    }

}
